package com.china.juju.entity;


import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name="juju_raffle_record"
    ,catalog="zutuan_prot"
)
public class JujuRaffleRecord  implements java.io.Serializable {

    private static final long serialVersionUID = 1L;

    public static final String ENTITY_NAME = "com.china.juju.entity.JujuRaffleRecord";
	public static final String TABLE_NAME="juju_raffle_record";

    public static final String PK_Field = "id"; 
    public static final String PK_Method = "getId";  
	
	public static final String P_id = "id"; 
	public static final String P_userid = "userid"; 
	public static final String P_raffleid = "raffleid"; 
	public static final String P_prizeIndex = "prizeIndex"; 
	public static final String P_prizeName = "prizeName"; 
	public static final String P_isFinished = "isFinished"; 
	public static final String P_finishAt = "finishAt"; 
	public static final String P_createdAt = "createdAt"; 
	public static final String P_updatedAt = "updatedAt"; 

     private String id;
     private String userid;
     private String raffleid;
     private Integer prizeIndex;
     private String prizeName;
     private Integer isFinished;
     private Date finishAt;
     private Date createdAt;
     private Date updatedAt;

    public JujuRaffleRecord() {
    }
	
    public JujuRaffleRecord(String id, String userid, String raffleid) {
        this.id = id;
        this.userid = userid;
        this.raffleid = raffleid;
    }
    public JujuRaffleRecord(String id, String userid, String raffleid, Integer prizeIndex, String prizeName, Integer isFinished, Date finishAt, Date createdAt, Date updatedAt) {
        this.id = id;
        this.userid = userid;
        this.raffleid = raffleid;
        this.prizeIndex = prizeIndex;
        this.prizeName = prizeName;
        this.isFinished = isFinished;
        this.finishAt = finishAt;
        this.createdAt = createdAt;
        this.updatedAt = updatedAt;
    }
   
    @Id 
    @GeneratedValue( generator="paymentableGenerator")  
    @GenericGenerator(name="paymentableGenerator", strategy="uuid")  
    
    @Column(name="ID", unique=true, nullable=false, length=36)
    public String getId() {
        return this.id;
    }
    
    public void setId(String id) {
        this.id = id;
    }
    
    @Column(name="userid", nullable=false, length=36)
    public String getUserid() {
        return this.userid;
    }
    
    public void setUserid(String userid) {
        this.userid = userid;
    }
    
    @Column(name="raffleid", nullable=false, length=36)
    public String getRaffleid() {
        return this.raffleid;
    }
    
    public void setRaffleid(String raffleid) {
        this.raffleid = raffleid;
    }
    
    @Column(name="prize_index")
    public Integer getPrizeIndex() {
        return this.prizeIndex;
    }
    
    public void setPrizeIndex(Integer prizeIndex) {
        this.prizeIndex = prizeIndex;
    }
    
    @Column(name="prize_name", length=512)
    public String getPrizeName() {
        return this.prizeName;
    }
    
    public void setPrizeName(String prizeName) {
        this.prizeName = prizeName;
    }
    
    @Column(name="is_finished")
    public Integer getIsFinished() {
        return this.isFinished;
    }
    
    public void setIsFinished(Integer isFinished) {
        this.isFinished = isFinished;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="finish_at", length=19)
    public Date getFinishAt() {
        return this.finishAt;
    }
    
    public void setFinishAt(Date finishAt) {
        this.finishAt = finishAt;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="created_at", length=19)
    public Date getCreatedAt() {
        return this.createdAt;
    }
    
    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="updated_at", length=19)
    public Date getUpdatedAt() {
        return this.updatedAt;
    }
    
    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }



    @Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
}


